package com.sjd.farm.mapper;


import com.sjd.farm.domain.SjdFarmOrderDO;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 农场订单(SjdFarmOrder)表Mapper
 *
 * @author seer
 * @date 2022-01-28 14:30:39
 */
public interface SjdFarmOrderMapper {

    /**
     * 增加
     *
     * @param sjdFarmOrder sjdFarmOrder
     * @return count
     */
    int insert(SjdFarmOrderDO sjdFarmOrder);

    /**
     * 更新有值字段
     *
     * @param sjdFarmOrder sjdFarmOrder
     * @return count
     */
    int updateSelectiveByOrderNo(SjdFarmOrderDO sjdFarmOrder);

    /**
     * 根据id查询
     *
     * @param id 主键
     * @return com.sjd.farm.domain.SjdFarmOrderDO
     */
    SjdFarmOrderDO getById(Long id);

    /**
     * 根据orderNo查询
     *
     * @param orderNo orderNo
     * @return object
     */
    SjdFarmOrderDO getByOrderNo(@Param("orderNo") String orderNo);

    /**
     * 查询
     *
     * @param memberId memberId
     * @return object
     */
    List<SjdFarmOrderDO> listByMember(@Param("memberId") Long memberId);

    /**
     * 查询
     *
     * @param startTime
     * @return
     */
    List<SjdFarmOrderDO> listCreate(@Param("startTime") LocalDateTime startTime);
}
